import React, { Component } from "react";

export default class listDemo extends Component {
  state = {
    demoList: [
      { id: 1, value: "我艹1" },
      { id: 2, value: "我艹2" },
      { id: 3, value: "我艹3" },
    ],
  };
  render() {
    let newList = this.state.demoList.map((item) => (
    return  <li key={item.id}>{item.value}</li>
    ));
    return (
      <div>
        <ol>{newList}</ol>
      </div>
    );
  }
}
